package vip.ola.service.dao.mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import vip.ola.core.entity.MchInfo;
import vip.ola.core.entity.MchInfoExample;

public interface MchInfoMapper {
    int countByExample(MchInfoExample example);

    int deleteByExample(MchInfoExample example);

    int deleteByPrimaryKey(Long mchId);

    int insert(MchInfo record);

    int insertSelective(MchInfo record);

    List<MchInfo> selectByExample(MchInfoExample example);

    MchInfo selectByPrimaryKey(Long mchId);

    int updateByExampleSelective(@Param("record") MchInfo record, @Param("example") MchInfoExample example);

    int updateByExample(@Param("record") MchInfo record, @Param("example") MchInfoExample example);

    int updateByPrimaryKeySelective(MchInfo record);

    int updateByPrimaryKey(MchInfo record);

    /**
     * 统计商户信息
     * @param param
     * @return
     */
    Map count4Mch(Map param);

    List<MchInfo> selectByExample2(Map param);

    int delPayOrderByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
    int delMchNotifyByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
    int delMchBillByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
    int delMchHistoryByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
    int delAgentHistoryByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
    int delSettRecordByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}